package main


type Node struct {
	Val int
	Children []*Node
}

func preorder(root *Node) []int {
	ans:=[]int{}
	
	var helper func(root *Node){
		if root==nil{
			return 
		}
		ans=(append(ans,root.Val))
		for _,n:=range root.Children{
			if n!=nil{
				helper(n,ans)
			}
		}
	}
	
	helper(root);

	return ans
}

func main(){

}